package fhv.at.imageprocessing.loadImage;

import java.beans.EventSetDescriptor;
import java.beans.MethodDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;

import fhv.at.imageprocessing.ImageChangedListener;

public class LoadImageBeanInfo extends SimpleBeanInfo {
	@Override
	public PropertyDescriptor[] getPropertyDescriptors() {
		try {
			PropertyDescriptor imagePath;
			Class cls = LoadImage.class;
			imagePath = new PropertyDescriptor("imagePath", cls);

			PropertyDescriptor pds[] = { imagePath };
			return pds;
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return null;
	}

	@Override
	public EventSetDescriptor[] getEventSetDescriptors() {
		try {
			EventSetDescriptor esd1;
			Class c = LoadImage.class;
			String es = "imageChanged";
			Class lc = ImageChangedListener.class;
			String names[] = { "imageValueChanged" };
			String al = "addImageChangedListener";
			String rl = "removeImageChangedListener";
			esd1 = new EventSetDescriptor(c, es, lc, names, al, rl);
			EventSetDescriptor esd[] = { esd1 };
			return esd;
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return null;
	}

	@Override
	public MethodDescriptor[] getMethodDescriptors() {
		MethodDescriptor mds[] = {};
		return mds;
	}

}
